home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TRNARND.TAS
< prev
next >
Wrap
Text File
|
1992-03-16
|
3KB
|
67 lines
{TRNARND.TAS => TRNARND.LST TAS408d}
{*****************************************************************}
{ This script
1. Looks at a 40 day linear regression and the slope of
that line to make sure it is negative to find stocks
that have been moving down.
2. Compares price to a 40 day moving average to make sure
the price has just crossed the average.
3. Compares volume of a 10 day and 40 day exponential average
to make sure that when the 10 volume is 1.5 times the 40
day when the price crosses.
written by Jerry Green on a suggestion by Bruce Jackson
3-15-92}
{*****************************************************************}
#max_quotes 80
#output_file TRNARND.LST
{*****************************************************************}
{ Write Heading }
{*****************************************************************}
if first_ticker then
begin
writeln('Symbol Name Price '
,' V Dif Comment');
writeln('------ ---------------- ------- ',
'----- -------------------');
end;
{*****************************************************************}
{ Create Arrays }
{*****************************************************************}
mva_40 : array;
vol_40 : array;
vol_5 : array;
dif_va : array;
lin_rg : array;
slop_l : array;
{*****************************************************************}
{ Caculate Equations }
{*****************************************************************}
mva_40 = mov(c,40,'s');
vol_40 = mov(v,40,'e');
vol_5 = mov(v,5,'e');
dif_va = mulby(div(vol_5,vol_40),100);
lin_rg = linreg(c,-40,0);
slop_l = slope(lin_rg);
{*****************************************************************}
{ Check Conditions }
{*****************************************************************}
if c[-1] < mva_40 and
c > mva_40 and
slop_l < 0 and
dif_va > 150
then
gosub graphit;
else
return;
{*****************************************************************}
{ Graph Ticker }
{*****************************************************************}
:graphit
writeln(ticker,fullname,c,int(dif_va),' Possible Turnaround');
opengraph(3);
sizegraph(4,2,1);
graph(1,''+format(c[0],'$%6.2f'),mva_40);
graph(v,'VOLUME AND 5 AND 50 DAY MA X',vol_5,vol_40);
graph(dif_va,'VOLUME DIFFERENCE');
closegraph();